#ifndef HGT_ANALYSIS_TOOL_H
#define HGT_ANALYSIS_TOOL_H 1

#include <FreeAnalysis/IAnalysisTool.h>
#include <osgGA/GUIEventAdapter>
#include <osgGA/GUIActionAdapter>
#include <osgEarth/MapNodeObserver>

class CAnalysisTool : public IAnalysisTool , public osgEarth::MapNodeObserver
{
public:
	CAnalysisTool(osgEarth::MapNode *pMapNode);

public: // override IAnalysisTool 
	virtual void SetEnabled(bool enabled);

	virtual bool IsEnabled();

public: // override osg::Group
	virtual void traverse(osg::NodeVisitor& nv);
	
public: // override osgEarth::MapNodeObserver
	virtual void setMapNode( osgEarth::MapNode* mapNode );

	virtual osgEarth::MapNode* getMapNode();

protected:
	virtual	~CAnalysisTool();

	virtual bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa);

	osg::observer_ptr<osgEarth::MapNode> m_opMapNode;
};

#endif // HGT_ANALYSIS_TOOL_H